#include<iostream>
#include<cmath>
using namespace std;
const float a = 10.2;
float t, x, y;
int main() {
	cin >> x;
	while (x!=-100)
	{
		if (x > 0) {
			t = a*a + x*x;
			t = sqrt(t);
			y = t;
			cout << y << endl;
		}
		else
		{
			t = 3 * a*x*x + 4 * a*x - 1;
			y = t;
			cout << y << endl;
		}
		cin >> x;
	}

	return 0;
}